#define POT A0
#define LED 3

int pot = 0;
int pwm = 0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(LED, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  pot = analogRead(POT);
  pwm = map(pot, 0, 1023, 0, 255);
  analogWrite(LED, pwm);
}
